package com.adtech.adms.system.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.json.annotations.JSON;

/**
 * 菜单数据模型
 * @author 门宏建 
 * @since 2011-6-8 
 * 
 * @Copyright (C) AD Tech Workshop All Right Reserved
 */
public class Feature implements Serializable {
	private static final long serialVersionUID = -6744750860215548802L;

	public static byte ENTRY_TYPE_BUTTON = 0;
	public static byte ENTRY_TYPE_MENU = 1;
	public static byte ENTRY_TYPE_URL = 2;

	private Long id;
	private String code;
	private String name;
	private Feature parent;

	private String url;
	private String urlTarget;
	private Integer serialNumber;
	private Byte entryType;
	private String comments;
	private String nameSpace;
	private Boolean operate;

	private Boolean root;
	
	private String classes;




	private List<Feature> children = new ArrayList<Feature>();
	private List<Role> roles = new ArrayList<Role>();
	//仅为页面使用
	private boolean checked;
	private boolean allCheck;

	public Integer getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(Integer serialNumber) {
		this.serialNumber = serialNumber;
	}

	public void setChildren(List<Feature> children) {
		this.children = children;
	}



	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Feature getParent() {
		return parent;
	}

	public void setParent(Feature parent) {
		this.parent = parent;
	}

	public List<Feature> getChildren() {
		return children;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUrlTarget() {
		return urlTarget;
	}

	public void setUrlTarget(String urlTarget) {
		this.urlTarget = urlTarget;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getNameSpace() {
		return nameSpace;
	}

	public void setNameSpace(String nameSpace) {
		this.nameSpace = nameSpace;
	}

	public Boolean getOperate() {
		return operate;
	}

	public void setOperate(Boolean operate) {
		this.operate = operate;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public Byte getEntryType() {
		return entryType;
	}

	public void setEntryType(Byte entryType) {
		this.entryType = entryType;
	}

	@JSON(serialize=false)
	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
	public Boolean getRoot() {
		return root;
	}

	public void setRoot(Boolean root) {
		this.root = root;
	}

	public String getClasses() {
		return classes;
	}

	public void setClasses(String classes) {
		this.classes = classes;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public boolean isAllCheck() {
		return allCheck;
	}

	public void setAllCheck(boolean allCheck) {
		this.allCheck = allCheck;
	}
	
}
